package com.hz.service;

import com.hz.pojo.Advertising;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdvertisingService {
    /**
     * 111
     * 根据广告id查询广告内容
     * @param advertising_id
     * @return 返回一条广告对象
     * @throws Exception
     */
    public abstract Advertising getAdvertisingContent(Long advertising_id) throws Exception;

    /**
     * 222
     * 插入一条广告记录
     * @param advertising 传入参数为一个对象
     * @return 返回受影响行数
     * @throws Exception
     */
    public abstract int addAdvertisingContent(Advertising advertising) throws Exception;

    /**
     * 333
     * 修改一条广告的内容
     * @param advertising 传入参数为一个对象
     * @return 返回受影响行数
     * @throws Exception
     */
    public abstract int updAdvertisingContent(Advertising advertising) throws Exception;

    /**
     * 444
     * 根据id删除对应广告信息
     * @param advertising_id
     * @return 受影响行数
     * @throws Exception
     */
    public abstract int delAdvertisingContent(Long advertising_id) throws Exception;

    /**
     * 555
     * 查询所有广告信息
     * @return 广告 集合
     * @throws Exception
     */
    public abstract List<Advertising> getAll() throws Exception;

    /**
     * 666
     * 根据广告id更新浏览量
     * @param advertising_id 广告id
     * @param advertising_traffic 浏览量
     * @return 受影响行数
     * @throws Exception
     */
    public abstract int updTrafficById(Long advertising_id, Long advertising_traffic) throws Exception;

    /**
     * 777
     * 根据浏览量给广告排序
     * @return 返回排序过后的广告集合
     * @throws Exception
     *//*
    public abstract List<Advertising> getAdvertisingByTraffic() throws Exception;*/
}
